package bookmanage.Opreation;


import bookmanage.BookDao;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.util.Scanner;

//删除书籍
public class DelOperation implements IOperation {
    @Override
    public void work() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入所要删除书籍的ID：");
        int bookId = scanner.nextInt();
        BookDao bookDao = new BookDao();
        boolean delete = bookDao.delete(bookId);
        if (delete = true){
            System.out.println("删除书籍成功！");
        }else {
            System.out.println("删除书籍失败！");
        }
    }
}
